package com.fr.drschizzo.raycaster.core;

public class RandomTools {

	public static int randomNb(int max) {
		return (randomNb(0, max));
	}

	public static boolean randomBool(int percent) {
		return (randomNb(percent) % percent) == 0;
	}

	public static boolean randomBool(int x, int y) {
		return randomBool(2);
	}

	public static boolean randomBool() {
		return randomBool(2);
	}

	public static int randomSign() {
		if (randomBool())
			return -1;
		else
			return 1;

	}

	public static int randomNb(int min, int max) {
		return (int) ((Math.random() * max) % max) + min;
	}

}